<% var pageLevelJS = { %>
<%include("/WEB-INF/views/btl/template/include/select2.html"){}%>
<script type="text/javascript">
var settings = {
		 modelDomainFlag:"auth"
		 ,modelName:"资源"
		 ,modelFlag:"res"
		 ,key:"${sessionId}" 
		}
</script> 
<script type="text/javascript" src="${ctx}/static/js/auth/res/edit.js"></script>
<%};%> 
<% var layoutParas =
{"title":"","add":isEmpty(data.id),"formId":"applyeditForm","pageLevelJS":pageLevelJS};
layout("/WEB-INF/views/btl/template/backBasicEditFormTemplate.html", layoutParas){ %>
  
   <input type="hidden" name="id" value="${data.id}">
   <%if(isEmpty(data.id)){%>
   <input type="hidden" valid="true" name="instanceId" oldval="${data.instanceId}" value="${data.instanceId}">
   <input type="hidden" valid="true" name="pId" oldval="${data.pId}" value="${data.pId}">
   <div class="form-group  col-md-5">
       <label for="name" class="col-sm-3 control-label no-padding-right">上级资源:</label>
       <div class="col-sm-9 inline-height ">
			  <input type="text" value="${data.pName}" class="disabled col-xs-10" disabled="disabled" name="pName" placeholder="" />
 	    </div> 
   </div>
   <%}else{%>
   <input type="hidden" valid="true" name="instanceId" oldval="${data.instanceId}" value="${data.instanceId}">
   <input type="hidden" valid="true" name="pId" oldval="${data.parent.id}" value="${data.parent.id}">
   <div class="form-group  col-md-5">
       <label for="name" class="col-sm-3 control-label no-padding-right">上级资源:</label>
       <div class="col-sm-9 inline-height ">
			  <input type="text" value="${data.parent.name}" class="disabled col-xs-10" disabled="disabled" name="pName" placeholder="" />
 	    </div> 
   </div>
   <%}%>
  <div class="form-group col-md-5">
     <label class="required-before col-sm-3 control-label no-padding-right" for="name">资源名:</label>
   	 <div class="col-sm-9 inline-height">
		 <input type="text" oldval="${data.name}" value="${data.name}" class="validate[required,maxSize[50]] col-xs-10" name="name" placeholder="资源名">
  	</div>
  </div>
  <div class="form-group col-md-5">
     <label class="required-before col-sm-3 control-label no-padding-right" for="permission">权限标识:</label>
      <div class="col-sm-9 inline-height">
		 <input type="text" oldval="${data.permission}" value="${data.permission}" class="validate[required,maxSize[100]] col-xs-10" name="permission" placeholder="权限标识">
	  </div>
  </div>
		 <div class="form-group col-md-5">
     <label class="required-before col-sm-3 control-label no-padding-right" for="categoryCode">类别:</label>
     <div class="col-sm-9 inline-height">
		 <select placeholder="类别" name="categoryCode" oldval="${data.categoryCode}" class="validate[required] col-xs-10">
			 <% for(res in resource!){ %>
			  <option value="${res.code}"
			  <%if(data.categoryCode==res.code){%>
				  selected="selected"
				 <%}%>
			  >${res.message}</option>
		　　   <% } %>
		</select>
	  </div>
  </div>
		 <div class="form-group col-md-5">
     <label class="col-sm-3 control-label no-padding-right" for="url">URL:</label>
      <div class="col-sm-9 inline-height">
		 <input type="text" oldval="${data.url}" value="${data.url}" class="validate[maxSize[100]] col-xs-10" name="url" placeholder="URL">
	  </div>
  </div> 
  <div class="form-group col-md-5">
     <label class="col-sm-3 control-label no-padding-right" for="iconStyle">图标:</label>
     <div class="col-sm-9 inline-height">
		  <input type="text" oldval="${data.iconStyle}" value="${data.iconStyle}" class="validate[maxSize[50]] col-xs-10" name="iconStyle" placeholder="图标">
	  </div>
  </div>
  <div class="form-group col-md-5">
     <label class="col-sm-3 control-label no-padding-right" for="fnStyle">显示样式:</label>
      <div class="col-sm-9 inline-height">
		 <input type="text" oldval="${data.fnStyle}" value="${data.fnStyle}" class="validate[maxSize[50]] col-xs-10" name="fnStyle" placeholder="显示样式">
	  </div>
  </div>
  <div class="form-group col-md-5">
     <label class="col-sm-3 control-label no-padding-right" for="reload">能否重新加载:</label>
	 <div class="col-sm-9 inline-height">
		  <select placeholder="重新加载" name="reload" oldval="${data.reload}" class="col-xs-10">
			<option value="false"
			  <%if(data.reload==false){%>
				  selected="selected"
				 <%}%>
			>否</option>
			<option value="true"
			  <%if(data.reload==true){%>
				  selected="selected"
				 <%}%>
			>是</option>
		</select>
	  </div>
  </div>
  <div class="form-group col-md-5">
     <label class="col-sm-3 control-label no-padding-right" for="bgStyle">背景样式:</label>
      <div class="col-sm-9 inline-height">
		 <input type="text" oldval="${data.bgStyle}" value="${data.bgStyle}" class="validate[maxSize[50]] col-xs-10" name="bgStyle" placeholder="背景样式">
	  </div>
  </div>
  <div class="form-group col-md-5">
     <label class="col-sm-3 control-label no-padding-right" for="scrollType">滚动条类别:</label>
     <div class="col-sm-9 inline-height">
		 <select placeholder="滚动条类别" name="scrollType" oldval="${data.scrollType}" class="col-xs-10">
			  <option value="">--类别--</option>
			 <% for(res in scrollType!){ %>
			  <option value="${res.code}"
			  <%if(data.scrollType==res.code){%>
				  selected="selected"
				 <%}%>
			  >${res.message}</option>
		　　   <% } %>
		</select>
	  </div>
  </div>
  <div class="form-group col-md-5">
     <label for="remark" class="col-sm-3 control-label no-padding-right">备注:</label>
     <div class="col-sm-9 inline-height">
	    <input type="text"  oldval="${data.remark}" value="${data.remark}" class="validate[maxSize[50]] col-xs-10" name="remark" placeholder="备注">
	  </div>
  </div>
<%} %>